package ar.com.ford.it.fullEconomics.interfaces.threadExecutor;

import ar.com.ford.it.fullEconomics.exception.FullEconomicsException;
import ar.com.ford.it.fullEconomics.facade.ProductionVolumesMixFacade;
import ar.com.ford.it.fullEconomics.persistence.dto.Teesg01Plant;
import ar.com.ford.it.fullEconomics.wslx.FullEconomicsWslxUser;
import commonj.timers.Timer;
import commonj.timers.TimerListener;

public class TimerProductionVolumesMix implements TimerListener {

	public String toString()
	{
		return "TimerProductionVolumesMix";
	}
	
	public void timerExpired(Timer arg0) {
		
	try {

	    System.out.println("+++ Ejecutando: " + this.toString() + " desde TimerManager");
        FullEconomicsWslxUser user = new FullEconomicsWslxUser("p_feefmc");
		ProductionVolumesMixFacade productionvolumesMixFacade = new ProductionVolumesMixFacade();
		Teesg01Plant teesg01Plant = new Teesg01Plant(); 
		teesg01Plant.setEesg01PlantCodeC("FI07A");
		user.setTeesg01Plant(teesg01Plant);
		productionvolumesMixFacade.processMix(user.getTeesg01Plant(), user);
		System.out.println("+++ finalizando: " + this.toString() + " desde TimerManager");

	} catch (FullEconomicsException e) {

        e.printStackTrace();
	}
       

	}

	
}
